package cn.tedu.spring.life;

/**
 * @author ruoLi
 */
public class User {
    private String username;
    public User() {
        System.out.println("实例化阶段");
    }

    public void setName(String username) {
        System.out.println("属性赋值阶段");
        this.username = username;
    }

    //初始化方法
    public void initMethod() {
        System.out.println("bean对象初始化,调用指定的初始化方法");
    }

    //销毁方法
    public void destroyMethod() {
        System.out.println("bean对象销毁，调用指定的销毁方法");
    }

    public String getUsername() {
        return username;
    }
}
